Cascading Style Sheets


This was produced with a stylesheet copied from a website and pasted into Notepad. Unlike the first one we used it contains a command about line-spacing, the technical term is "leading". CSS Stands For Cascading Style Sheets. It is used to change the overall Style of a page. For those browsers that support it, it has the "last say" in how a page is displayed. Sometimes you want a site to have its own identity, or you want to use a template so that you site has a bit of regularity. It's this that CSS prides itself on. Like JavaScript it can be used inline (inside a regular tag) or in the head between STYLE tags. The reason they are called cascading style sheets is that you can define and redefine certain objects through out the code. For example:

a{text-decoration:none; color:blue}
then later in the text...
a{text-decoration:line-through}

In this case...the "color" value keeps cascading down and so still works even after "a" has apparently been redefined. This is also known as Inheritance as certain characteristics are inherited. Please note that not all characteristics are inherited. Also the blue part does not have the leading that the rest of the document has. This is because they are marked up with different tags. The beginning and end of the document are tagged as paragraphs, while the blue part is tagged as a division. These two tags are given different characteristics in the document head.



Link back to the first page


Link back to the second page


Link back to the third page


Home


1